package com.chance.cc.crawler.prod.command.trigger.domain.vm.bitauto;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.vm.bitauto.geely.BitAutoWebForumGeelyReleaseCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.bitauto.geely.BitAutoWebForumGeelyTraceCrawlerSchedulerJob;
import com.chance.cc.crawler.prod.command.job.domain.vm.bitauto.realtime.*;
import com.chance.cc.crawler.prod.command.job.domain.vm.bitauto.trace.*;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @author lt
 * @version 1.0
 * @date 2020-12-09 16:15:28
 * @email okprog@sina.com
 */
public class BitAutoCommonCrawlerScheduleTrigger extends CommonCrawlerSchedulerTrigger {


    public static void main(String[] args) {
       // publishBitAutoArticleCrawlerScheduleTriggerInfo();
       // publishBitAutoArticleTraceCrawlerScheduleTriggerInfo();
       // publishBitAutoVideoCrawlerScheduleTriggerInfo();
        //回溯视频
//        publishBitAutoVideoTraceCrawlerScheduleTriggerInfo();
//        publishBitAutoForumReleaseCrawlerScheduleTriggerInfo();
//        publishBitAutoForumReplyCrawlerScheduleTriggerInfo();
//        publishBitAutoForumInteractionCrawlerScheduleTriggerInfo();
//        publishBitAutoPraiseCrawlerScheduleTriggerInfo();
//        publishBitAutoPraiseTraceCrawlerScheduleTriggerInfo();
//        publishBitAutoHaoArticleCrawlerScheduleTriggerInfo();
//        publishBitAutoHaoArticleTraceCrawlerScheduleTriggerInfo();

        //吉利项目
       // publishBitAutoForumGeelyRealtimeCrawlerScheduleTriggerInfo();
      //  publishBitAutoForumGeelyTraceCrawlerScheduleTriggerInfo();

        //车型信息采集
        //publishBitAutoCarTypeCrawlerScheduleTriggerInfo();
        //经销商采集
        publishBitAutoDelearCrawlerScheduleTriggerInfo();

    }



    /**
     * 发布经销商信息采集

     */
    public static void publishBitAutoDelearCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebDelearCrawlerScheduleJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebArticleCrawlerSchedulerJob.domain,
                //CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                //"0 0 5 * * ?",
                "",
                "易车新闻实时采集任务执行，每天定时7点采集"
        );
    }

    /**
     * 发布车型信息采集

     */
    public static void publishBitAutoCarTypeCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebCarTypeCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebArticleCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                "",
                "易车品牌采集任务执行，不定时采集"
        );
    }


    /**
     * 发布易车新闻trigger info

     */
    public static void publishBitAutoArticleCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebArticleCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebArticleCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "易车新闻实时采集任务执行，每小时执行一次"
        );
     
    }
    /**
     * 发布易车新闻回溯trigger info

     */
    public static void publishBitAutoArticleTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebArticleTraceCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebArticleTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "易车新闻回溯三天采集任务执行，每天执行一次"
        );
    }


    /**
     * 发布易车视频trigger info

     */
    public static void publishBitAutoVideoCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebVideoCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebVideoCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/4 * * ?",
                "易车视频实时采集任务执行，每4小时执行一次"
        );
    }

    /**
     * 发布易车视频回溯trigger info

     */
    public static void publishBitAutoVideoTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebVideoTraceCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebVideoTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
               // CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                //"",
                "易车视频回溯三天采集任务执行，每天执行一次"
        );
    }


    /**
     * 发布易车论坛最新发布trigger info

     */
    public static void publishBitAutoForumReleaseCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebForumReleaseCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebForumReleaseCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "易车论坛最新发布实时采集任务执行，每小时执行一次"
        );
    }

    /**
     * 发布易车论坛最新回复trigger info

     */
    public static void publishBitAutoForumReplyCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebForumReplyCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebForumReplyCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "易车论坛最新回复回溯采集任务执行，每天执行一次"
        );
    }

    /**
     * 发布易车论坛回溯三天互动量trigger info

     */
    public static void publishBitAutoForumInteractionCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebForumInteractionCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebForumInteractionCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "易车论坛回溯三天互动量采集任务执行，每天执行一次"
        );
    }


    /**
     * 发布易车口碑实时采集任务trigger info

     */
    public static void publishBitAutoPraiseCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebPraiseCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebPraiseCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 8/1 * * ?",
                "易车口碑实时采集任务执行，每小时执行一次"
        );
    }

    /**
     * 发布易车口碑回溯七天回复trigger info

     */
    public static void publishBitAutoPraiseTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebPraiseTraceCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebPraiseTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "易车口碑回溯七天回复采集任务执行，每天执行一次"
        );
    }



    /**
     * 发布易车号文章实时采集任务trigger info

     */
    public static void publishBitAutoHaoArticleCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebHaoArticleCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebHaoArticleCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0/30 * * * ?",
                "易车号文章实时采集任务执行，每半小时执行一次"
        );
    }

    /**
     * 发布易车号文章回溯七天回复trigger info

     */
    public static void publishBitAutoHaoArticleTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebHaoArticleTraceCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebHaoArticleTraceCrawlerSchedulerJob.domain,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 1 * * ?",
                "易车号文章回溯七天回复采集任务执行，每天执行一次"
        );
    }


    /**
     * 吉利项目易车论坛发布时间排序
     */
    public static void publishBitAutoForumGeelyRealtimeCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebForumGeelyReleaseCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebForumGeelyReleaseCrawlerSchedulerJob.domain,
//                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 17 * * ?",
//                "",
                "易车论坛发布时间排序吉利项目，每日17采集一次"
        );
    }

    /**
     * 吉利项目易车论坛回复时间排序
     */
    public static void publishBitAutoForumGeelyTraceCrawlerScheduleTriggerInfo(){
        CrawlerJob crawlerJob = BitAutoWebForumGeelyTraceCrawlerSchedulerJob.bitAutoScheduler();
        metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(
                crawlerJob.generateCrawlerKey(),
                crawlerJob.generateCrawlerTriggerKey(),
                BitAutoWebForumGeelyTraceCrawlerSchedulerJob.domain,
//                CrawlerMetaConstant.ScheduleJobTrigger_Simple,
                CrawlerMetaConstant.ScheduleJobTrigger_Cron,
                "0 0 17 * * ?",
//                "",
                "易车论坛回复时间排序吉利项目，每日17采集一次"
        );
    }
}
